Question: Does a continuous wetland to upland gradient exist? Or, can a catena-type model be derived using wetlands and uplands in a data-driven approach?
If the ends of the wetland/upland classification are accurate, does the intermediate range correspond with hypothesized soil formation characteristics.
Uplands are Bhs, Typic
Wetlands are Bh, Histosols
Intermediate Bimodal?
hbdem <- rast("UplandWetlandGradient/data/dem1m.tif")
plot(hbdem)
hb <- vect("UplandWetlandGradient/data/hbef_wsheds/hbef_wsheds.shp")
lines(hb)
nwi <- vect("UplandWetlandGradient/data/HU8_01070001_Watershed/HU8_01070001_Wetlands.shp") |>
project("EPSG:26919")
hbnwi <- crop(nwi, ext(hbdem))
names(hbnwi)
## [1] "ATTRIBUTE" "WETLAND_TY" "ACRES" "Shape_Leng" "Shape_Area"
plot(hbdem)
plot(hbnwi, "WETLAND_TY", type = "classes", add = T)
hbgeo <- vect("UplandWetlandGradient/data/hbef_bedrock/hbef_bedrock.shp")
plot(hbgeo, type = "classes")
# 1 meter LiDAR-derived, Filtered Hydro-enforced Digital
# Elevation Model (DEM)
hb1mlpns <- rast("UplandWetlandGradient/data/hydem1mlpns.tif")
plot(hb1mlpns)
randupl <- spatSample(hbdem, 2000, as.points = TRUE, xy = TRUE)
hbnwi_buff <- buffer(hbnwi, 50)
hbupl_pts <- terra::mask(randupl, hbnwi_buff, inverse = T) |>
mutate(class = "UPL") |>
select(-dem1m)
plot(hbupl_pts, type = "points")
lines(hbnwi_buff)
hbwet_pts <- spatSample(hbnwi, size = 500) |>
mutate(class = "WET") |>
select(class)
plot(hbwet_pts, type = "classes")
hbpts_all <- rbind(hbupl_pts, hbwet_pts)
hbpts_ext <- terra::extract(hbdem, hbpts_all, bind = T)
hbpts <- hbpts_ext |>
dplyr::filter(!is.na(dem1m))
writeVector(hbpts, "UplandWetlandGradient/data/derived_data/hbpts_raw.gpkg",
overwrite = TRUE)
plot(hbdem)
plot(hbpts, "class", type = "classes", add = T)
Make terrain metrics
hbslp_3 <- SlpAsp(hbdem, w = c(3, 3), metrics = "slope", filename = "UplandWetlandGradient/data/derived_data/hbslp_3.tif",
overwrite = T)
hbslp_27 <- SlpAsp(hbdem, w = c(27, 27), metrics = "slope", filename = "UplandWetlandGradient/data/derived_data/hbslp_27.tif",
overwrite = T)
hbslp_81 <- SlpAsp(hbdem, w = c(81, 81), metrics = "slope", filename = "UplandWetlandGradient/data/derived_data/hbslp_81.tif",
overwrite = T)
hbtpi_3 <- TPI(hbdem, w = c(3, 3), shape = "rectangle", stand = "none",
na.rm = TRUE, filename = "UplandWetlandGradient/data/derived_data/hbtpi_3.tif",
overwrite = T)
hbtpi_27 <- TPI(hbdem, w = c(27, 27), shape = "rectangle", stand = "none",
na.rm = TRUE, filename = "UplandWetlandGradient/data/derived_data/hbtpi_27.tif",
overwrite = T)
hbtpi_81 <- TPI(hbdem, w = c(81, 81), shape = "rectangle", stand = "none",
na.rm = TRUE, filename = "UplandWetlandGradient/data/derived_data/hbtpi_81.tif",
overwrite = T)
hbcurv_3 <- Qfit(hbdem, w = c(3, 3), metrics = c("meanc", "profc",
"planc"), unit = "degrees", na.rm = TRUE, filename = "UplandWetlandGradient/data/derived_data/hbcurv_3.tif",
overwrite = T)
hbcurv_27 <- Qfit(hbdem, w = c(27, 27), metrics = c("meanc",
"profc", "planc"), unit = "degrees", na.rm = TRUE, filename = "UplandWetlandGradient/data/derived_data/hbcurv_27.tif",
overwrite = T)
hbcurv_81 <- Qfit(hbdem, w = c(81, 81), metrics = c("meanc",
"profc", "planc"), unit = "degrees", na.rm = TRUE, filename = "UplandWetlandGradient/data/derived_data/hbcurv_81.tif",
overwrite = T)
Slope at different scales
plot(hbslp_3)
plot(hbslp_27)
plot(hbslp_81)
TPI at different scales
plot(hbtpi_3)
plot(hbtpi_27)
plot(hbtpi_81)
Curvature at different scales
plot(hbcurv_3)
plot(hbcurv_27)
plot(hbcurv_81)